package com.ceshiren.Pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import java.util.List;

public class SearchResultPage extends BasePage{
    private final By searchallresult=By.cssSelector(".topic-title");
    private final By searchnoresult =By.xpath("//*[text()='找不到结果。']");

    public SearchResultPage(WebDriver basedriver) {
        super(basedriver);
    }

    public  List<WebElement> getHasResult(){
        List<WebElement> finds = finds(searchallresult);
        shot();
        return finds;
    }
    public String  getNoResult(){
        return find(searchnoresult).getText();
    }
}
